<?php

namespace App\Models;


class Project extends Orm
{
    //

    protected $table = 'project';
    protected $dateFormat = 'U';
    public $timestamps = true;

    public function setPicsAttribute($value)
    {
        $this->dealSetImageAttribute('pics', $value);
    }


    public function getLngAttribute()
    {
        return floatval($this->attributes['lng']);
    }

    public function getLatAttribute()
    {
        return floatval($this->attributes['lat']);
    }

    public function getStateAttribute()
    {
        return $this->attributes['state'] == 1 ? '进行中' : '已结束';
    }

}
